<!--
 * @Author: Shber
 * @Date: 2024-07-03 14:48:33
 * @LastEditors: Shber
 * @LastEditTime: 2024-07-03 15:04:13
 * @Description: 
-->
<template>
<view class="side_menu">
  <view class="menu_item" v-for="item in dataList" :class="{active: item.id===0}">
    <text>{{item.label}}</text>
  </view>
</view>
</template>
<script setup>
import {ref, watch} from 'vue'
const emits = defineEmits(['onSuccess'])
const props = defineProps({
  data: {
    type: Array,
    default: ()=>[]
  }
})

const dataList = ref([])

watch(() => props.data, (newVal) => {
  dataList.value = newVal
},{ immediate: true })
</script>
<style lang="scss" scoped>
.side_menu{background-color: #f8f8f9; width: 110px;}
.menu_item{padding: 15px 10px; font-size: 14px; color: #666666;}
.active{background-color: #fff; border-right: 2px solid #2DAED6;}
</style>